//
//  LaunchController.swift
//  SecretChat
//
//  Created by TimTiger on 16/6/21.
//  Copyright © 2016年 TimTiger. All rights reserved.
//

import UIKit
import SCMessageSDK
import MudFramework

class LaunchController: NSObject {
    /**
     init Application
     */
    class func launch(application: UIApplication,launchoptions: [NSObject: AnyObject]?) {
    
        //一些通用的外观设置
        setAppearance()
        
        //显示主页面
        showMainView()
        
        //连接推送服务器
       
    }
    
    /// 显示主页面函数
    class private func showMainView() {
        let mainVC:MainViewController? = MainViewController()
        let appdelegate: SCAppDelegate = UIApplication.sharedApplication().delegate as! SCAppDelegate
        appdelegate.window?.rootViewController = mainVC
    }
    
    class private func setAppearance() {
        UITabBarItem.appearance().titlePositionAdjustment = UIOffsetMake(0,-3)
        UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName:SCColor.blackColor(),NSFontAttributeName:UIFont.boldSystemFontOfSize(12)], forState: UIControlState.Selected)
        UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName:SCColor.grayColor(),NSFontAttributeName:UIFont.boldSystemFontOfSize(12)], forState: UIControlState.Normal)
    }
}

extension LaunchController {
    
}
